URL='http://localhost:8601/';
var token= localStorage.getExpire("token");
function delComment(comment_id) {
    $.ajax({
        xhrFields: {
            withCredentials: true
        },
        headers:{"Authorization":token},
        url:URL+'deleteComment',
        data:{comment_id: comment_id},
        dataType: 'json',
        type: 'post',
        success: function (data) {
            if(data==1){
                layer.msg('成功200', {
                    time: 2000 //2秒关闭（如果不配置，默认是3秒）
                }, function () {
                    location.reload(true);
                })
            }else{
                layer.msg(data.msg, {time: 3000});
            }
        }
    })
}
function delReply(reply_id) {
    $.ajax({
        xhrFields: {
            withCredentials: true
        },
        headers:{"Authorization":token},
        url:URL+'delReplyById',
        data:{reply_id: reply_id},
        dataType: 'json',
        type: 'post',
        success: function (data) {
            if(data==1){
                layer.msg('成功200', {
                    time: 2000 //2秒关闭（如果不配置，默认是3秒）
                }, function () {
                    location.reload(true);
                })
            }else{
                layer.msg(data.msg, {time: 3000});
            }
        }
    })
}